// 此文件用于配置项和相关参数设置

// 详情展示页
// 基本信息
// 基础信息模块
const detailInfo = [{
        label: '维护单号',
        name: 'repNumber',
        value: ''
    }, {
        label: '报修员',
        name: 'reportUserName',
        value: ''
    }, {
        label: '报修时间',
        name: 'createdTime',
        value: ''
    }, {
        label: '维护期限',
        name: 'repExpEndTime',
        value: ''
    }, {
        label: '维护时间',
        name: 'repTime',
        value: ''
    }
    // }, {
    //     label: "使用部门",
    //     name: "organName",
    //     value: "1"
    // }, {
    //     label: "责任人",
    //     name: "responsible",
    //     value: "1"
    // }, {
    //     label: "投产日期",
    //     name: "productDate",
    //     value: "1"
    // }, {
    //     label: "出厂编号",
    //     name: "factoryNumber",
    //     value: "1"
    // }, {
    //     label: "型号",
    //     name: "deviceModel",
    //     value: "1"
    // }, {
    //     label: "设备原值",
    //     name: "assetValue",
    //     value: "1"
    // }, {
    //     label: "使用年限",
    //     name: "useYears",
    //     value: "1"
    // }, {
    //     label: "设备主图",
    //     name: "drawPath",
    //     value: "1",
    //     isHiddan: true
    // }

]
const supplyInfo = []
const histroyShowInfo = [{
        label: '一级 1',

        children: [{
            label: '二级 1-1',
            imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
        }]
    },
    {
        label: '一级 2',
        children: [{
                label: '二级 2-1',
                imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
            },
            {
                label: '二级 2-2',
                imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
            }
        ]
    },
    {
        label: '一级 3',
        children: [{
                label: '二级 3-1',
                imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
            },
            {
                label: '二级 3-2',
                imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
            }
        ]
    }
]
const detailShowInfo = {
        detailInfo: detailInfo,
        supplyInfo: supplyInfo,
        // broadInfo: broadInfo,
        histroyShowInfo: histroyShowInfo
    }
    // 基础信息表单配置
const formData = {
    title: '维护基本信息',
    formModel: {
        deviceId: '1',
        deviceName: '1',
        fixAssetCode: '1',
        deviceNumber: '1',
        deviceType: '1',
        deviceClass: '1',
        useDepartment: '1',
        responsible: '1',
        productDate: '1',
        factoryNumber: '1',
        model: '1',
        deviceValue: '1',
        mainDrawPath: ''
    },
    formComponent: [{
            type: 'input',
            label: '设备名称',
            model: 'deviceName',
            keyUpEnter: 'handleFilter',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'input',
            label: '固定资产编码',
            model: 'fixAssetCode',
            option: [1, 2, 3],
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]

        },
        {
            type: 'input',
            label: '设备编号',
            model: 'deviceNumber',
            format: 'yyyy-MM-dd',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]

        },
        {
            type: 'select',
            label: '设备类型',
            model: 'deviceType',
            options: [{
                label: '设备类型1',
                value: '1'
            }, {
                label: '设备类型2',
                value: '2'
            }],
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'select',
            label: '设备分类',
            model: 'deviceClass',
            options: [{
                label: '设备分类1',
                value: '1'
            }, {
                label: '设备分类2',
                value: '2'
            }],
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'input',
            label: '使用部门',
            model: 'useDepartment',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'input',
            label: '责任人',
            model: 'responsible',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'datePicker',
            label: '投产日期',
            model: 'productDate',
            format: 'yyyy-MM-dd',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'input',
            label: '出厂编号',
            model: 'factoryNumber',
            format: 'yyyy-MM-dd',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'input',
            label: '型号',
            model: 'model',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'input',
            label: '设备原值',
            model: 'deviceValue',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        },
        {
            type: 'upload',
            label: '设备主图',
            model: 'deviceMainDrawPath',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        }
    ]
}

// 档案信息
const histroyInfo = {
        title: '档案信息',
        formModel: {
            fileTitle: ''
        },
        formComponent: [{
            type: 'upload',
            label: '设备档案',
            model: 'title',
            keyUpEnter: 'handleFilter',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        }]
    }
    // 整理后的表单配置
const totalForm = [{
        formName: '基础信息',
        formRef: 'table1', // 表单ref
        formModel: formData.formModel, // 表单model
        formComponent: formData.formComponent,
        formName: formData.title // 表单标题
    },
    {
        formName: '档案信息',
        formRef: 'table3', // 表单ref
        formModel: histroyInfo.formModel, // 表单model
        formComponent: histroyInfo.formComponent,
        formName: histroyInfo.title, // 表单标题
        formStyle: 'box-margin-card'
    }
]
const repairDeviceColumns = [
    { prop: 'deviceName', label: '设备名称', minWidth: 180 },
    { prop: 'assetNumber', label: '设备编号', minWidth: 180 },
    { prop: 'organName', label: '使用部门', minWidth: 180 }
]
const repairPersonColumns = [
    { prop: 'empno', label: '员工编号', minWidth: 180 },
    { prop: 'realName', label: '姓名', minWidth: 180 },
    { prop: 'phone', label: '手机号', minWidth: 180 },
    { prop: 'organName', label: '部门', minWidth: 180 },
    { prop: 'positionsName', label: '职位' }
]
const plantCheckDeviceColumns = [
    { prop: 'part', label: '点检部位', minWidth: 180 },
    { prop: 'content', label: '点检内容', minWidth: 180 },
    { prop: 'resultState', label: '执行结果', minWidth: 180 },
    { prop: 'userName', label: '实际点检员', minWidth: 180 },
    { prop: 'actFinishTime', label: '实际完成时间', minWidth: 180 },
    { prop: 'pic', label: '点检图片', slotName: 'operate-pic', minWidth: 180 },
    { prop: 'video', label: '点检视频', slotName: 'operate-video', minWidth: 180 }
]
const preserveDeviceColumns = [
    { prop: 'part', label: '保养部位', minWidth: 180 },
    { prop: 'content', label: '保养内容', minWidth: 180 },
    { prop: 'resultState', label: '执行结果', minWidth: 180 },
    { prop: 'userName', label: '实际保养员', minWidth: 180 },
    { prop: 'actFinishTime', label: '实际完成时间', minWidth: 180 }
]
const xunjianDeviceColumns = [
    { prop: 'part', label: '巡检部位', minWidth: 180 },
    { prop: 'content', label: '巡检内容', minWidth: 180 },
    { prop: 'resultState', label: '执行结果', minWidth: 180 },
    { prop: 'userName', label: '实际巡检员', minWidth: 180 },
    { prop: 'actFinishTime', label: '实际完成时间', minWidth: 180 },
    { prop: 'pic', label: '点检图片', slotName: 'operate-pic', minWidth: 180 },
    { prop: 'video', label: '点检视频', slotName: 'operate-video', minWidth: 180 }
]
const data = {

    totalForm: totalForm,
    // ----------表单显示相关---------//
    detailShowInfo: detailShowInfo,
    // --------维护设备表格--------//
    repairDeviceColumns: repairDeviceColumns,
    // --------维护员表格--------//
    repairPersonColumns: repairPersonColumns,
    // -------点检异常表格--------//
    plantCheckDeviceColumns: plantCheckDeviceColumns,
    // --------保养异常表格--------//
    preserveDeviceColumns: preserveDeviceColumns,
    // --------巡检异常表格--------//
    xunjianDeviceColumns: xunjianDeviceColumns

}
export default data